package com.sip.dbadapter.dao.impl;

import java.io.Serializable;
import java.util.List;

import com.sip.dbadapter.dao.domain.ApiDefinition;
import com.sip.dbadapter.dao.interfaces.ApiDao;


public class ApiDefinitionDaoImpl extends BusinessDaoImpl<ApiDefinition, Serializable> implements ApiDao {

  


    @Override
    protected Class<ApiDefinition> getDomainClass() {

      
        return ApiDefinition.class;
    }

    @Override
	public long getApiId(String apiName) {
		//String apiName1="getOffer";
    	long apiId=0l;
    	List<Object> apiIDList=(List<Object>) exec("select A.apiId from " + getDomainClass().getName() + " A where A.name='"+apiName+"'");
		// TODO Auto-generated method stub
    	if(apiIDList.size()>0)
           apiId=(Long)apiIDList.get(0);
		return apiId;
	}
 

}
